package com.nineclock.system.service;

import com.nineclock.attendance.dto.DepartmentOrUserSimpleDTO;
import com.nineclock.common.entity.PageResult;
import com.nineclock.system.entity.ExcelMember;
import com.nineclock.system.dto.SysCompanyUserDTO;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.util.List;

/**
 * @Package: com.nineclock.system.service
 * @ClassName: SysCompanyUserService
 * @Author: 小康
 * @CreateTime: 2021-06-11 13:28
 * @Description:
 */
public interface SysCompanyUserService {
//获取当前部门列表
    List<SysCompanyUserDTO> queryCompanyMemberList();
//员工查询
    PageResult<SysCompanyUserDTO> members(Integer page, Integer pageSize, String keyword, Long departmentId);
    /**
     * 批量导入员工数据
     * @param excelFile
     */
    public void importData(MultipartFile excelFile) throws IOException;

    /**
     * 处理解析完毕之后的员工数据, 进行数据组装及持久化操作
     * @param memberList
     */
    public void handleParsedData(List<ExcelMember> memberList);

    /**
     * 根据部门ID, 查询该部门下的员工数量
     * @param departmentIds
     * @return
     */
    public Integer queryUserCountByDepartmentIds(List<Long> departmentIds);
    /**
     * 查询员工或者部门数据列表
     * @param departmentId 部门ID
     * @param includeMember   0 为包含 ; 1 为 不包含
     * @return
     */
    List<DepartmentOrUserSimpleDTO> querySimpleDepartment(Long departmentId, Integer includeMember);

    SysCompanyUserDTO queryOne(String mobile);
    /**
     * 根据企业id查询所有员工信息
     * @param companyId
     * @return
     */
    List<SysCompanyUserDTO> queryAllUserByCompanyId(Long companyId);
    /**
     * 根据企业ID查询企业的主管理员信息
     * @param companyId
     * @return
     */
    public SysCompanyUserDTO queryAdminByCompanyId(Long companyId);

    List<SysCompanyUserDTO> queryCompanyUser(Long userId, Long companyId);
}
